package gs.sr.tkfx.util;

import gs.sr.tkfx.param.AppInfoBase;

import com.taobao.api.DefaultTaobaoClient;
import com.taobao.api.TaobaoClient;

public class TaobaoClientFactory {
	private static final boolean isproductenv = true;

	public static TaobaoClient getTaobaoClient(AppInfoBase appInfoBase) {
		return new DefaultTaobaoClient(
				isproductenv ? appInfoBase.getServerUrl()
						: appInfoBase.getServerUrlOfSandbox(),
				appInfoBase.getAppKey(), appInfoBase.getAppSecret());
	}

}
